<template>
  <div class="container">
    <div class="whole">
      <h1>欢迎来到 XAUAT iOS Club</h1>
      <h1>西安建筑科技大学iOS众创空间俱乐部</h1>
    </div>
    <div class="whole">
      <h1>这里是</h1>
      <h2>梦想家们改变世界的起点</h2>
      <h2>一个跨专业与课堂的开发爱好者社团</h2>
    </div>
    <div class="whole">
      <img alt="西建大ios club活动室" :src="imagePath" />
    </div>
    <div class="whole">
      <h1>在这里，你能</h1>
      <h2>跨越学科，体验编程与开发的魅力</h2>
      <h2>创造人生，开发非同凡响的APP</h2>
      <h2>与全世界的开发者们交流梦想</h2>
    </div>
    <div class="whole">
      <h1>当然，不只是开发</h1>
      <h2>这里还是数码爱好者的交流基地</h2>
      <h2>也是Minecraft玩家们的天堂</h2>
      <h2>更是.....(想不出来了)</h2>
    </div>
  </div>
</template>

<script>
// import { ro } from 'element-plus/es/locale';

export default {
  // eslint-disable-next-line vue/multi-word-component-names
  name: 'Home',
  data() {
    return {
      imagePath: require('@/assets/RIP.jpg'), // 替换为你的图片路径
    };
  },
  // 修改html的css实现翻页效果
  mounted() {
    /* 修改滚动属性 */
    document.documentElement.style.scrollBehavior = 'smooth';
    document.documentElement.style.scrollSnapType = 'y mandatory';
    document.documentElement.style.overflowY = 'scroll';
  },
  unmounted() {
    document.documentElement.style.scrollBehavior = '';
    document.documentElement.style.scrollSnapType = '';
    document.documentElement.style.overflowY = '';
  }
}
</script>

<style scoped>
h1 {
  font-size: 56px;
  margin-top: 20px;
  margin-bottom: 20px;
  //color:#1d1d1f;
  color: #f5f5f7;
  animation: fade-in 1s ease-in-out;
}

h2 {
  font-size: 48px;
  margin-top: 20px;
  margin-bottom: 20px;
  //color:#1d1d1f;
  color: #f5f5f7;
  animation: fade-in 1s ease-in-out;
}

@keyframes fade-in {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

p {
  font-size: 18px;
}

.container {
  text-align: center;
  position: relative;
  width: 100%;
  height: 100%;
  /* 使得视图可以滚动 */
}

.whole {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;

  /* 指定对齐方式，这里使用 start 表示页面顶部对齐 */
  scroll-snap-align: center;
}
</style>